<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('添加考核人')"/>
    <th:block th:include="include :: datetimepicker-css"/>
    <th:block th:include="include :: select2-css"/>
    <th:block th:include="include :: bootstrap-select-css"/>
</head>
<style>
    input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }

    input[type="number"] {
        -moz-appearance: textfield;
    }

    .budget {
        white-space: nowrap !important;
        padding-top: 0px !important;

    }
</style>
<body>
<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="dv">
    <form class="form-horizontal m" id="form-budget-add" AUTOCOMPLETE="OFF">
        <input type="hidden" id="type" name="type" th:value="${type}">
        <h4 class="form-header h4">基本信息</h4>

        <div class="form-group">
            <div class="col-sm-12">
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">年份：</label>
                    <div class="col-sm-8">
                        <select name="years" id="years" class="form-control noselect2">
                            <option value="">请选择</option>
                            <option value="2020">2020</option>
                            <option value="2021">2021</option>
                            <option value="2022">2022</option>
                            <option value="2023">2023</option>
                            <option value="2024">2024</option>
                            <option value="2025">2025</option>
                        </select>
                    </div>
                </div>
                <div class="col-sm-6">
                    <label class="col-sm-4 control-label">月份：</label>
                    <div class="col-sm-8">
                        <select name="months" id="months" class="form-control noselect2">
                            <option value="">请选择</option>
                            <option value="1">一月</option>
                            <option value="2">二月</option>
                            <option value="3">三月</option>
                            <option value="4">四月</option>
                            <option value="5">五月</option>
                            <option value="6">六月</option>
                            <option value="7">七月</option>
                            <option value="8">八月</option>
                            <option value="9">九月</option>
                            <option value="10">十月</option>
                            <option value="11">十一月</option>
                            <option value="12">十二月</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div id="unique"></div>

    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: select2-js"/>

<script type="text/javascript">
    var prefix = ctx + 'budget';

    $(function () {
        if ($("#type").val() == "bb" || $("#type").val() == "cz" || $("#type").val() == "bbcy" || $("#type").val() == "ly") {
            $("#unique").append("<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">营业总收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lastYearCount\" name=\"lastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">营业总收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"monthlyBudget\" name=\"monthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">联营：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lyLastYearCount\" name=\"lyLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">联营：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lyMonthlyBudget\" name=\"lyMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">房租：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"fzLastYearCount\" name=\"fzLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">房租：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"fzMonthlyBudget\" name=\"fzMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">物业费：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"wyfLastYearCount\" name=\"wyfLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">物业费：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"wyfMonthlyBudget\" name=\"wyfMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">其他收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"qtsrLastYearCount\" name=\"qtsrLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">其他收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"qtsrMonthlyBudget\" name=\"qtsrMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyLastYearCount\" name=\"gdfyLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyMonthlyBudget\" name=\"gdfyMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbLastYearCount\" name=\"rlcbLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbMonthlyBudget\" name=\"rlcbMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyLastYearCount\" name=\"bdfyLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyMonthlyBudget\" name=\"bdfyMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">水电气能耗：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"sdqnhLastYearCount\" name=\"sdqnhLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">水电气能耗：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"sdqnhMonthlyBudget\" name=\"sdqnhMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrLastYearCount\" name=\"lrLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrMonthlyBudget\" name=\"lrMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>")
        }
        if ($("#type").val() == "ecological") {
            $("#unique").append("<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">营业总收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lastYearCount\" name=\"lastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">营业总收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"monthlyBudget\" name=\"monthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyLastYearCount\" name=\"gdfyLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyMonthlyBudget\" name=\"gdfyMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbLastYearCount\" name=\"rlcbLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbMonthlyBudget\" name=\"rlcbMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyLastYearCount\" name=\"bdfyLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyMonthlyBudget\" name=\"bdfyMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">水电气能耗：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"sdqnhLastYearCount\" name=\"sdqnhLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">水电气能耗：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"sdqnhMonthlyBudget\" name=\"sdqnhMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrLastYearCount\" name=\"lrLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrMonthlyBudget\" name=\"lrMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>");
        }
        if ($("#type").val() == "hotel") {
            $("#unique").append("<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">营业总收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lastYearCount\" name=\"lastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">营业总收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"monthlyBudget\" name=\"monthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\" style=\"white-space: nowrap;\">客房收入小计：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"kfsrxjLastYearCount\" name=\"kfsrxjLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\" style=\"white-space: nowrap;\">客房收入小计：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"kfsrxjMonthlyBudget\" name=\"kfsrxjMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">餐饮收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"cysrLastYearCount\" name=\"cysrLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">餐饮收入：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"cysrMonthlyBudget\" name=\"cysrMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyLastYearCount\" name=\"gdfyLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyMonthlyBudget\" name=\"gdfyMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbLastYearCount\" name=\"rlcbLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbMonthlyBudget\" name=\"rlcbMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyLastYearCount\" name=\"bdfyLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyMonthlyBudget\" name=\"bdfyMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">水电气能耗：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"sdqnhLastYearCount\" name=\"sdqnhLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">水电气能耗：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"sdqnhMonthlyBudget\" name=\"sdqnhMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrLastYearCount\" name=\"lrLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrMonthlyBudget\" name=\"lrMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>");
        }
        if ($("#type").val() == "headquarters") {
            $("#unique").append("<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">产值合计：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"czhjLastYearCount\" name=\"czhjLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">产值合计：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"czhjMonthlyBudget\" name=\"czhjMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyLastYearCount\" name=\"gdfyLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">固定费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"gdfyMonthlyBudget\" name=\"gdfyMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbLastYearCount\" name=\"rlcbLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">人力成本：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"rlcbMonthlyBudget\" name=\"rlcbMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyLastYearCount\" name=\"bdfyLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">变动费用：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"bdfyMonthlyBudget\" name=\"bdfyMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>" +
                "<div class=\"form-group\">\n" +
                "            <div class=\"col-sm-12\">\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrLastYearCount\" name=\"lrLastYearCount\"\n" +
                "                               placeholder=\"请输入上年同期月累计\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "                <div class=\"col-sm-6\">\n" +
                "                    <label class=\"col-sm-4 control-label\">利润：</label>\n" +
                "                    <div class=\"col-sm-8\">\n" +
                "                        <input class=\"form-control\" type=\"number\" id=\"lrMonthlyBudget\" name=\"lrMonthlyBudget\"\n" +
                "                               placeholder=\"请输入月度预算\" required/>\n" +
                "                    </div>\n" +
                "                </div>\n" +
                "            </div>\n" +
                "        </div>");
        }
    })

    function validform(formId) {
        return $(formId).validate()
    }

    function submitHandler() {

        if (validform("#form-budget-add").form()) {
            if ($("#months").val() == "" || $("#years").val() == "") {
                alert("请检查单位、年份和月份是否选择!");
                return false;
            } else {
                var data = $("#form-budget-add").serializeArray();
                console.log(data);
                $.operate.save(prefix + "/add", data);
            }

        }
    }
</script>

</body>
</html>